import { Button, Space } from 'antd'
import { QrcodeOutlined } from '@ant-design/icons';
import React from 'react'
import './index.less'
import {  useQRCodeModalDow, useQRCodeModalNDow } from '@/store/adapter/useGlobalStatus';
import { objArr } from './1'
const UseTool = () => {
    const { showQrcodeMobalDow } = useQRCodeModalDow()
    const { showQrcodeMobalNDow } = useQRCodeModalNDow()
    const ToolArr = [
        {
            name: "二维码生成工具(支持下载)",
            iconName: QrcodeOutlined,
            key: "qrcode",
            onClick: () => {
                showQrcodeMobalDow()
            }
        },
        {
            name: "二维码生成工具(不支持下载)",
            iconName: QrcodeOutlined,
            key: "qrcode1",
            onClick: () => {
                showQrcodeMobalNDow()
            }
        },
        {
            name: "待开发",
            iconName: QrcodeOutlined,
            key: "3",

        },
        {
            name: "待开发",
            iconName: QrcodeOutlined,
            key: "4",

        },
        {
            name: "待开发",
            iconName: QrcodeOutlined,
            key: "5",

        },
    ]
    return (
        <div >
            <Space size="large" wrap align="center" >
                {ToolArr.map((item, index) => (
                    // eslint-disable-next-line react/no-array-index-key
                    <div style={{ width: 300 }} key={item.key}>
                        <Button className='btn-css' type="primary" key={item.key} size="large" block={true} icon={<item.iconName />} onClick={item.onClick}>{item.name}</Button>
                    </div>
                ))}
            </Space></div>
    )
}

export default UseTool